/**
 * 添加或者修改页面
 */
var ArchiveMaterialsInfoDlg = {
    data: {
        xh: "",
        wh: "",
        zlmc: "",
        zllx: "",
        qspzh: "",
        jspzh: "",
        qsym: "",
        jzym: "",
        nd: "",
        beiz: "",
        sfyx: "",
        daid: ""
    }
};

layui.use(['form', 'admin', 'ax'], function () {
    var $ = layui.jquery;
    var $ax = layui.ax;
    var form = layui.form;
    var admin = layui.admin;

    var parentId = Feng.getUrlParam("parentId");

    $("#daid").val(parentId);

    //表单提交事件
    form.on('submit(btnSubmit)', function (data) {
        var ajax = new $ax(Feng.ctxPath + "/archiveMaterials/addItem", function (data) {
            Feng.success("更新成功！");
            admin.putTempData("formOk",true);
            admin.closeThisDialog();
        }, function (data) {
            Feng.error("更新失败！" + data.responseJSON.message)
        });
        ajax.set(data.field);
        ajax.start();
        return false;
    });

});